package com.swsc.solarverse.service.forward.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.swsc.solarverse.dao.entity.forward.ForwardStringDataCurrentdayDO;
import com.swsc.solarverse.dao.mapper.forward.ForwardStringDataCurrentdayMapper;
import com.swsc.solarverse.service.forward.IForwardStringDataCurrentdayService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-05-06
 */
@Service
public class ForwardStringDataCurrentdayServiceImpl extends ServiceImpl<ForwardStringDataCurrentdayMapper, ForwardStringDataCurrentdayDO> implements IForwardStringDataCurrentdayService {

    @Override
    public void truncate() {
        baseMapper.truncate();
    }

    @Override
    public void truncateYesterday() {
        baseMapper.truncateYesterday();
    }

    @Override
    public void truncateBeforeYesterday() {
        baseMapper.truncateBeforeyesterday();
    }

    @Override
    public LocalDateTime maxDataTime() {
        return baseMapper.maxDataTime();
    }

    @Override
    public LocalDateTime maxDataTimeByOrgan(Integer organNo) {
        return baseMapper.maxDataTimeByOrgan(organNo);
    }

    @Override
    public LocalDateTime maxDataTimeByOrganAndTimeRange(Integer organNo, LocalDateTime dataTimeGe, LocalDateTime dataTimeLt) {
        return baseMapper.maxDataTimeByOrganAndTimeRange(organNo, dataTimeGe, dataTimeLt);
    }

    @Override
    public int insertIgnoreBatch(List<ForwardStringDataCurrentdayDO> list) {
        return baseMapper.insertIgnoreBatch(list);
    }

    @Override
    public int insertIgnoreBatchYesterday(List<ForwardStringDataCurrentdayDO> list) {
        return baseMapper.insertIgnoreBatchYesterday(list);
    }

    @Override
    public List<ForwardStringDataCurrentdayDO> listByOrganAndTimeRange(Integer organNo, LocalDateTime dataTimeGe, LocalDateTime dataTimeLt) {
        return baseMapper.listByOrganAndTimeRange(organNo, dataTimeGe, dataTimeLt);
    }

    @Override
    public void copyYesterdayData2BeforeYesterday(LocalDateTime start, LocalDateTime end) {
        baseMapper.copyYesterdayData2BeforeYesterday(start, end);
    }

    @Override
    public void copyCurrentdayData2Yesterday(LocalDateTime start, LocalDateTime end) {
        baseMapper.copyCurrentdayData2Yesterday(start, end);
    }
}
